<template>
  <div>
    <template>
      <div>
        <el-table
          :data="memberList"
          style="width: 100%"
          row-key="id"
          border
          lazy
          :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
        >
          <el-table-column prop="id" label="用户编号" width="180">
          </el-table-column>
          <el-table-column prop="nickname" label="昵称" width="180">
          </el-table-column>
          <el-table-column prop="phone" label="手机号"> </el-table-column>
          <el-table-column label="状态">
            <template slot-scope="scope">
              <div>
                <el-button type="info" v-if="scope.row.status == 1"
                  >启用</el-button
                >
                <el-button type="primary" v-else>禁用</el-button>
              </div>
            </template>
          </el-table-column>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <div>
                <el-button type="info" @click="dit(scope.row.id)"
                  >编辑</el-button
                >
                
              </div>
            </template>
          </el-table-column>
        </el-table>
       
      </div>
    </template>
  </div>
</template>
<script>
import { mapGetters, mapActions } from "vuex";
import { goodsList, goodsEdit, goodsDel } from "../../../requster/api";

export default {
  props: [],
  components: {
    
  },
  data() {
    return {
      form: [{ msg: "" }],
    };
  },
  computed: {
    ...mapGetters({
      memberList: "member/list",
      
    }),
  },
  methods: {
    //   点击编辑
    dit(id) {
      this.$emit("dit", id);
    },
    
    ...mapActions({
      reqchangelist: "member/reqChangeList",
    
    }),
  },
  mounted() {
      this.reqchangelist()
  },
};
</script>
<style scoped>
.imm {
  width: 100px;
  height: 100px;
}
</style>